package lps.bet.basico.cartaoMgr;

import java.util.List;
import lps.bet.interfaces.ICartaoMgt;
import lps.bet.interfaces.ICartaoTerminalMgt;
import lps.bet.variabilidades.HibernateAspectSupport;
import lps.bet.variabilidades.cartaoPgtoCartaoCtrl.CartaoPgtoCartaoCtrl;
 

public aspect AcessoAdicionalAspect {
	public ICartaoMgt interfaceCartaoMgt;
	public ICartaoTerminalMgt   interfaceCartaoTerminalMgt;
	HibernateAspectSupport h;


	pointcut buscarViagensPorCartao(int cartaoID):
			
	 call (List ICartaoMgt.buscarViagensPorCartao(int))
	 && args(cartaoID)
	 && !within(CartaoPgtoCartaoCtrl) 
	 && !within(AcessoAdicionalAspect) 
	 ;

	@SuppressWarnings("unchecked")
	List around(int cartaoID): buscarViagensPorCartao(cartaoID){
	
			return interfaceCartaoMgt.buscarViagensPorCartao(cartaoID);
	
	}

	pointcut buscarViagensTerminalPorCartao(int cartaoID):
		
		call (List ICartaoMgt.buscarViagensTerminalPorCartao(int))
		&& args(cartaoID)
		&& !within(CartaoPgtoCartaoCtrl) 
		&& !within(AcessoAdicionalAspect) 
		;

	@SuppressWarnings("unchecked")
	List around(int cartaoID): buscarViagensTerminalPorCartao(cartaoID){

		return interfaceCartaoTerminalMgt.buscarViagensTerminalPorCartao(cartaoID);

	}

	public ICartaoMgt getInterfaceCartaoMgt() {
		return interfaceCartaoMgt;
	}

	

public HibernateAspectSupport getH() {
	return h;
}

public void setInterfaceCartaoTerminalMgt(
		ICartaoTerminalMgt interfaceCartaoTerminalMgt) {
	this.interfaceCartaoTerminalMgt = interfaceCartaoTerminalMgt;
}
public void setInterfaceCartaoMgt(ICartaoMgt interfaceCartaoMgt) {
		this.interfaceCartaoMgt = interfaceCartaoMgt;
}



public ICartaoTerminalMgt getInterfaceCartaoTerminalMgt() {
	return interfaceCartaoTerminalMgt;
}


public void setH(HibernateAspectSupport h) {
	this.h = h;
}}
